class_name GameStarter
extends Node

## 游戏的入口脚本

func _ready() -> void:
	## 需要初始化的模块、系统脚本在这里初始化，需要注意先后顺序
	## 现在直接通过代码查找初始化，特殊的（比如需要参数）可以单独处理
	for child in get_tree().current_scene.get_parent().get_children():
		if child is BaseSystem:
			await child.init_system()
			print("{0} 初始化完毕!".format([child.name]))
	GameEventBus.GameSystemInited.emit()
	## 显示第一个场景
	var fade_in_first_scene_options = GameSceneSystem.create_options(1, "fade")
	var first_scene_general_options = GameSceneSystem.create_general_options(Color(0, 0, 0), 0.3, false)
	GameSceneSystem.show_first_scene(fade_in_first_scene_options, first_scene_general_options)
	GameViewSystem.open_view(GameEnum.ViewType.MainMenuView)
	#GameViewSystem.open_view(GameEnum.ViewType.ComboView,{GameMode = GameManager.game_mode,GameState = GameManager.get_cur_game_state()})
